
#ifndef _MEMBER_BFLOATSPINBOX_H_
#define _MEMBER_BFLOATSPINBOX_H_

#include <BLine2>
#include <BButton>
#include <BFloatSpinBox>
#include "ILineBlock.h"

namespace BWE
{
	class member_BFloatSpinBox : public BObject
	{
		friend class BFloatSpinBox;
	public:
		member_BFloatSpinBox(BFloatSpinBox* doubleSpinbox);
		~member_BFloatSpinBox();

		bool freshSizes();
		bool freshRects();
		BLine2 inputLine();
		void textEdited();

		void slotButtonClicked(BObject* object);

		BFloatSpinBox*		boss;
		Align				align;
		float				value;
		int					decimals;
		float				step;
		BRangef				range;
		BString				prefix;
		Align				prefixAlign;
		BString				suffix;
		Align				suffixAlign;
		BButton*			upButton;
		BButton*			downButton;
		bool				readOnly;
		bool				formulable;
		bool				wheelEnabled;
		int					bitNum;
		BReal				blinkTime;
		BReal				blinkTick;
		bool				blinkShown;
		float				lineWidth;
		const BStyle*		prefixStyle;
		const BStyle*		suffixStyle;

		bool				dirtySize;
		BString				t_prefix;
		BSize				prefixSize;
		BString				t_suffix;
		BSize				suffixSize;
		BRect				textArea;

		bool				dirty;
		bool				editing;
		BReal				focusedTime;
		bool				hovered;
		bool				pressed;
		int					pressedIndex;
		BRect				prefixRect;
		ILineBlock			block;
		BRect				suffixRect;
		int					hoverIndex;
	};
}

#endif